Observing a Build
The second method, for C and C++ only, is to have Perforce QAC·GUI observe a build of the code project. You trigger a build, and Perforce QAC·GUI monitors the process and identifies files being compiled, paths being used, and various other information. Refer to Build Monitoring Synchronization.
Various settings in preparation for this are set in the Project Properties’ Sync Settings tab.
Many of the following settings will have been set when you previously selected a CCT:
- Include Path Options: these should be the switches that the compiler recognizes as indicating an include path.
- Define Symbol Options: these should be the switches that the compiler recognizes as defining a value.
- Option Script: Path to a script that can extract Include Paths and Definitions from a compiler command line
- Compiler Settings File Options: for compilers that store options in a file, these settings allow you to identify that file1.
- Literal Quotes: this option helps Perforce QAC decide how to parse quotes. If the option is checked, any unescaped quotes will be used to encase spaced options. For example, if the option is checked, then the following:
/DMAX(A,B)="A < B"
will create a macro which verifies whetherA
is less thanB
. If the option is left unchecked, then all quotes will be taken as literals, and the following string will be output:"A < B"
. - Exclude Processes - Comma Separated: this option allows you to supply a comma separated list of process names that should be ignored. For example, if your build script uses the mv command to move files from one location to another, and the rm command to remove files from disk, then you may wish to enter mv,rm here to ignore these processes.
- Exclude Processes - Regular Expression: this option allows you to supply a regular expression for the process names that should be ignored.2 As above, if your build script uses the mv command to move files from one location to another, and the rm command to remove files, use
\b(rm|mv)\b
to ignore these processes. - File Filter: this option allows you to supply a comma separated list of files and/or folders that should not be added to the Perforce QAC project.
For the other settings, refer to Compiler Settings File Options.
The above settings will persist as part of the project. Once you are satisfied, you can trigger the operation by selecting Project : Synchronize. Then proceed as in Synchronization via QA·GUI.